package com.share.pojo.dto;

import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * Created with IntelliJ IDEA.
 *
 * @author liw
 * @version 1.0
 * @date 2024/4/8 15:57
 */
@Data
public class ExpressDto {

    private String title;

    private String code;

    private List<Price> price;

    @Data
    public static class Price {
        private String destination;
        private String w15;
        private String w25;
        private String code;


    }

    public  static final Map<Integer, Function<Price, String>> MAP = new HashMap<>();
    static {
        MAP.put(3, Price::getW15);
        MAP.put(5, Price::getW25);
    }



}
